<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
<input type="text" name="age" />
<span id="msg"></span>
</body>
</html>

<script type="text/javascript">
    // let a = 1,b=2,c='1';
    // console.log(a < b);//true
    // console.log(a == b)//false
    // console.log(a === c)//false
    // console.log(a == true)//true
    // console.log(a === true)//false
    let span = document.querySelector("#msg");
    //键盘事件
    document.querySelector('[name="age"]')
    .addEventListener('keyup',function(){
        span.innerHTML = this.value >= 90 ? "太老了" : '年龄很合适';
    });
</script>